﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrderList.ascx.cs" Inherits="TCKQKL.FrontEnd.Web.Controls.OrderList" %>
<link href="../styles/data.css" rel="stylesheet" type="text/css" />
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
</asp:ScriptManagerProxy>
<asp:UpdatePanel ID="pnlOrderList" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <% if (orderList.Count > 0)
           {%>
        <asp:DataList ID="rptOrders" runat="server" Width="100%" RepeatColumns="0" RepeatLayout="Flow"
            RepeatDirection="Horizontal" AlternatingItemStyle-BackColor="#CCCCCC" OnItemCommand="rptOrders_ItemCommand">
            <HeaderTemplate>
                <table class="data" style="border: none;">
                    <tr>
                        <th class="InnerHeading" style="text-align: left;">
                            &nbsp; Huỷ
                        </th>
                        <th class="InnerHeading" style="text-align: left;">
                            Id
                        </th>
                        <th class="InnerHeading" style="text-align: left;">
                            Bên
                        </th>
                        <th class="InnerHeading" style="text-align: left;">
                            Mã CK
                        </th>
                        <th class="InnerHeading" style="text-align: left;">
                            Loại
                        </th>
                        <th class="InnerHeading" style="text-align: left;">
                            KL
                        </th>
                        <th class="InnerHeading" style="text-align: left;">
                            Giá
                        </th>
                        <th class="InnerHeading" style="text-align: left;">
                            Thời gian
                        </th>
                        <th class="InnerHeading" style="text-align: left;">
                            Trạng thái
                        </th>
                        <th class="InnerHeading" style="text-align: left;">
                            &nbsp;
                        </th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <asp:CheckBox ID="matched" runat="server" />
                    </td>
                    <td>
                        <asp:Label ID="lblOrderId" runat="server" Text='<%# Eval("OrderId") %>'></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblOrderSide" runat="server" Text='<%# Eval("OrderSide") %>'></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblSymbol" runat="server" Text='<%# Eval("Symbol") %>'></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblOrderClass" runat="server" Text='<%# Eval("OrderClass") %>'></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblQuantity" runat="server" Text='<%# Eval("Quantity") %>'></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Price") %>'></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblTimeStamp" runat="server" Text='<%# Eval("TimeStamp") %>'></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblOrderNo" runat="server" Text='<%# (Eval("OrderNo")=="")?"CHỜ XỬ LÝ":Eval("OrderNo") %>'>&nbsp;</asp:Label>
                    </td>
                    <td>
                        <asp:ImageButton ImageUrl="../images/delete.jpg" runat="server" ID="btnDelete" CommandName="Change" CommandArgument='<%# Eval("OrderId").ToString() %>'
                            OnClientClick="return confirm('Are you sure to change this?');" />
                            
                        <asp:Label ID="Label1" runat="server" Text='<%# (Eval("OrderNo")=="")?"CHỜ XỬ LÝ":Eval("OrderNo") %>'>&nbsp;</asp:Label>
                        
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                <tr>
                    <td colspan="11" style="text-align: right; border-bottom: none;">
                        <asp:Button ID="btnCancel" runat="server" Text="Huỷ lệnh" OnClick="btnCancel_Click"
                            OnClientClick="confirmSubmit();" />
                    </td>
                </tr>
                </table>
            </FooterTemplate>
        </asp:DataList><%} %>
        <asp:Timer ID="tmRefreshList" runat="server" OnTick="tmRefreshList_Tick" Interval="30000">
        </asp:Timer>
    </ContentTemplate>
</asp:UpdatePanel>
